Skip to content

Compatible with RealCamera - #556

Draft
H31M5 wants to merge 3 commits into
Traben-0:masterfrom
H31M5:master
Draft

Compatible with RealCamera#556
H31M5 wants to merge 3 commits into
Traben-0:masterfrom
H31M5:master

Conversation

@H31M5

@H31M5 H31M5 commented Jul 1, 2026

Copy link
Copy Markdown

This PR fixes compatibility issues with RealCamera, as shown in the attached screenshot
E83C774FFAB2BF9CD58EC7C8895547D1
P.S. The screenshot was captured to reproduce the bug on an older version. No resource pack that triggers the issue has been found in the latest release yet, so the fix cannot be verified for the time being

I inject via Mixin into the computeCamera() and captureRotatedEntity(), adding a static boolean flag to toggle single-frame guard activation

Also, I'm unsure whether I should use @pseudo or shouldApplyMixin here, so I kept both annotations.
I also don't know the standard, more idiomatic way to write multi-version compatible mods, so this is the implementation I came up with.

@Traben-0 Traben-0 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be more issues i only gave this a review online and didnt test in-game

if you just want me to handle the fixes for you i can do that but I won't be doing that myself anytime soon

Comment thread src/main/java/traben/entity_model_features/mixin/Plugin.java Outdated
varConsumer.accept(vars, true);
//Default is TRUE
boolean shouldUpdateVars = RealCameraCompat.isShouldRenderEntity();
varConsumer.accept(vars, shouldUpdateVars);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: a nicer point to check this would be inside the the isLODSkippingThisFrame() check just a bit above this as it seems like at a glance you want the same thing that accomplishes and i already do similar things in there to pause things during iris's shadow pass, unless i've missed somet technical detail here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a question: if registerPauseCondition is called, is it still necessary to perform modifications here?

Additionally, if we disable rendering logic inside isLODSkippingThisFrame, will this cause entity position desync?
To elaborate: when animation updates are blocked, the head position we retrieve remains its original value. Once rendering resumes from the player’s view, the head will shift due to resource pack adjustments, resulting in clipping through models.

@Traben-0 Traben-0 Jul 25, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm i might have been misunderstanding what you were trying to accomplish here, as i said i havent tested in-game yet so ignore this for now

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do push your other changes first btw as i'll want to test with all those addressed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still a few issues. As shown in the screenshot, registerPauseCondition does not seem to apply correctly in version 26.1, while it works fine on 1.21.1
屏幕截图(123)
On Fabric, I’m attempting registration inside onInitializeClient(). I also set breakpoints during debugging and confirmed that this block of code runs normally, yet the logic still fails to take effect

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to check the relevant code, please take a look at lines 55 to 63 here

Comment thread build.gradle.kts Outdated
Comment thread gradle.properties Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants